package com.zrrd.learn.exam;

import java.util.Scanner;

/**
 * @author wrn
 * @version 1.0
 * @date 2023/8/31 14:23
 */

public class test20230831_06 {

    /**
     * 6.实现会员注册，要求用户名长度不小于3，密码长度不小于6，注册时两次输入密码必须相同 （字符串）
     * @param args
     */
    public static void main(String[] args) {
        System.out.println("请输入用户名");
        Scanner scanner1 = new Scanner(System.in);
        String user = scanner1.nextLine();

        System.out.println("请输入密码");
        Scanner scanner2 = new Scanner(System.in);
        String mima1 = scanner2.nextLine();

        System.out.println("请再次输入密码");
        Scanner scanner3 = new Scanner(System.in);
        String mima2 = scanner3.nextLine();

        if (user.length()>=3){
            if ( mima1.length() >= 6){
                if (mima1.equals(mima2)) {
                    System.out.println("恭喜你注册成功！");
                } else {
                    System.out.println("两次密码不一致!");
                }
            } else {
                System.out.println("密码长度不小于6!");
            }
        } else {
            System.out.println("用户名长度不小于3!");
        }

    }

}
